import os

path = os.getcwd()
parent_path = os.path.dirname(path)
lst_files = os.walk(parent_path)
print(lst_files)

for dirpath, dirname, filename in lst_files:
    if dirpath.find('chap') > 0:
        # print(dirpath, dirname, filename)
        for dir in dirname:
            print(os.path.join(dirpath, dir))
        for file in filename:
            print(os.path.join(dirpath, file))
        print('------------------')
